package com.wthink.hzgj.data.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.wthink.hzgj.data.domain.Setting

@Dao
interface SettingDao {
    @Query("SELECT * FROM Setting")
    suspend fun list(): List<Setting>

    @Query("SELECT * FROM Setting where `key`=:key")
    suspend fun findByKey(key: String): Setting?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun save(data: Setting)
}